import request from '@/utils/request'

// 查询标准规范征求意见列表
export function listRequest(query) {
  return request({
    url: '/standard/request/list',
    method: 'get',
    params: query
  })
}

// 查询标准规范征求意见详细
export function getRequest(sid) {
  return request({
    url: '/standard/request/' + sid,
    method: 'get'
  })
}

// 新增标准规范征求意见
export function addRequest(data) {
  return request({
    url: '/standard/request',
    method: 'post',
    data: data
  })
}

// 修改标准规范征求意见
export function updateRequest(data) {
  return request({
    url: '/standard/request',
    method: 'put',
    data: data
  })
}

// 删除标准规范征求意见
export function delRequest(sid) {
  return request({
    url: '/standard/request/' + sid,
    method: 'delete'
  })
}

// 导出标准规范征求意见
export function exportRequest(query) {
  return request({
    url: '/standard/request/export',
    method: 'get',
    params: query
  })
}

//====================================== private start ===============================================

// 查询标准规范附件
export function getUploadFiles(sid) {
  return request({
    url: '/standard/request/uploadfiles/' + sid,
    method: 'get'
  })
}

// 附件上传新增
export function addUploadFile(data) {
  return request({
    url: '/standard/request/attachment/add',
    method: 'post',
    data: data
  })
}

// 附件上传修改
export function updateUploadFile(data) {
  return request({
    url: '/standard/request/attachment/update',
    method: 'post',
    data: data
  })
}

// 附件上传删除
export function delUploadFile(data) {
  return request({
    url: '/standard/request/attachment/delete',
    method: 'post',
    data: data
  })
}

//====================================== private end ===============================================
